package com.yuchao.springboot.controller;


import com.yuchao.redis.templete.JedisTemplete;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: xingyuchao
 * @date: 2019-11-21
 */
@RestController
@RequestMapping(value="/index")
public class IndexController {

	@Autowired
	private JedisTemplete jedisTemplete;
	
	@GetMapping(value="/get")
	public String get() {
		return jedisTemplete.getValue("name");
	}


	@GetMapping(value="/set")
	public String set() {
		return jedisTemplete.setValue("name","xingyuchao");
	}
}
